<html>
<head>
<style>
div span { margin 2px; }
div ~ span { margin 2px; }
div > span { margin 2px; }
div + span { margin 2px; }
div#temp { margin 2px; }
div.test[title="test"] { margin: 2px; }
.test[title~="test"] { margin: 2px; }
div > [title|="test"] { margin: 2px; }
div.test[title^="test"] { margin: 2px; }
span#test[title$="test"] { margin: 2px; }
span[title*="test"]::after { margin: 2px; }
div[title] { margin: 2px; }
[title] { margin: 2px; }
a:link { margin: 2px; }
div, span > div:hover, a { margin: 2px; }
div span#foo.test div:hover#bar a { margin: 2px; }
/* Pseudo-classes */
:link{ margin: 2px; }
:visited{ margin: 2px; }
:active{ margin: 2px; }
:focus{ margin: 2px; }
:target{ margin: 2px; }
:root{ margin: 2px; }
:foobarSelectorNotToBePrinted{ color: green; }
:enabled{ margin: 2px; }
:disabled{ margin: 2px; }
:checked{ margin: 2px; }
:indeterminate{ margin: 2px; }
:first-child{ margin: 2px; }
:last-child{ margin: 2px; }
:first-of-type{ margin: 2px; }
:last-of-type{ margin: 2px; }
:only-child{ margin: 2px; }
:only-of-type{ margin: 2px; }
:empty{ margin: 2px; }
::first-line{ margin: 0 }
::selection{ margin: 2px; }
::before{ margin: 2px; }
::after{ margin: 2px; }
</style>
</head>
<body>
<pre id="result"></pre>
<script>
if (window.testRunner)
    testRunner.dumpAsText();
var styleSheet = document.styleSheets.item(0);
var s = "";
for (var i = 0; i < styleSheet.cssRules.length; i++) {
    var rule = styleSheet.cssRules[i];
    s += rule.selectorText + "\n";
}
document.getElementById("result").innerText = s;
</script>
</body>
</html>
